A graphics card (e.g., a graphics processor, GPU, etc.) is a special-purpose processor designed for executing computer graphics algorithms on a general purpose computer. Graphics processors often include a specialized programming model that corresponds to the details of a typical computer graphics pipeline. A central processing unit (CPU) uses a graphics processor as a co-processor, much in the way that CPUs have historically used floating point co-processors. The CPU off-loads graphics-related computation to a GPU, since the GPU efficiently executes graphics-related computation.
The computational capabilities of many GPUs now significantly exceed the capabilities of CPUs particularly in the area of floating point computation and vector processing. Because the graphics card (e.g., GPU) is often more powerful than the CPU, there has been significant interest in programming the GPUs to solve many (graphics) and non-graphics problems. Although GPUs have been harnessed to solve non-graphics problems, it has been difficult for non-graphics programmers to learn because of the specialized programming model used by GPUs.
There are several obstacles that programmers face. First, they have to learn a specialized programming model used by GPUs. Two common programming interfaces for programming GPUs are DirectX® and OpenGL®. Both are difficult to learn because they are graphics computation oriented. Second, after learning a specialized programming model, a programmer is required to learn a new specialized programming language such as Cg® or HLSL®. Third, there are many subtleties and limitations (e.g., resource limitations) required when programming a GPU that are unknown to procedural or object-oriented programmers. Failure to manage these resources properly will result in a non-working program. For a given graphics programming environment, there may be limitations on the size of programs (e.g., instruction counts), limitations on the available memory, and limitations on the number of input data structures, as well as many other possible limitations. Because of these difficulties, the benefits of a graphics engine have not yet been harnessed by many general purpose programmers.